/**
  * Author: Jordi Vilaplana Mayoral <jvilaplana@semicinternet.com>
  * Date: 16/05/2011
  * 
  * OpenFileRename
  * Copyright (C) 2011 Semic Internet
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation, either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * 
  * @(#)
  * Description: Renames files following the specified format in Alfresco.
  */

/*
 * Log types:
 * 				USE:	Statistic events used to monitor the user experience.
 * 						Turned off by default, only used in prepared user experience sessions.
 * 				DEBUG:	Informational events that are useful to debug the application.
 * 				INFO:	Informational messages.
 * 				WARN:	Messages generated by handled exceptions.
 * 				ERROR:	Messages generated by handled exceptions.
 * 				FATAL:	Uncommon errors that were not expected.
 * 				
 */

package main;

import javax.swing.UIManager;
import model.OpenFileModel;
import view.OpenFileView;
import controller.OpenFileController;

public class OpenFileRename {

	public static void main(String[] args) {
	    try {
	    	
	    	/* Encrypt the password [http://www.jasypt.org] */
//	    	StandardPBEStringEncryptor passwordEncryptor = new StandardPBEStringEncryptor();
//	    	passwordEncryptor.setPassword("0p3nL0gV|w3r&");
//	    	String encryptedPassword = passwordEncryptor.encrypt("log$55&user.$");
//	    	System.out.println(encryptedPassword);
	    	
	    	UIManager.setLookAndFeel("com.jtattoo.plaf.smart.SmartLookAndFeel");
	    	
	    	OpenFileModel      model      = new OpenFileModel();
	        OpenFileView       view       = new OpenFileView(model);
	        @SuppressWarnings("unused")
			OpenFileController controller = new OpenFileController(model, view);

	        //view.setAlwaysOnTop(true);
	        view.setVisible(true);
	        view.setLocationRelativeTo(null);

	    } catch (Exception unused) {
	    	unused.printStackTrace();
	    }
	}

}
